﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace LDSP.UI.EnterpriseAdmin.Report
{
    public partial class ImgPie : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            CreateChart();
        }

        private void CreateChart()
        {

            //Create some dummy Data  

            Random random = new Random();

            for (int pointIndex = 0; pointIndex < 10; pointIndex++)
            {

                cht_report.Series["Series1"].Points.AddY(random.Next(20, 100));

            }//Set the chart type  

            cht_report.Series["Series1"].ChartType = System.Web.UI.DataVisualization.Charting.SeriesChartType.Pie;// Set the Pie width  

            cht_report.Series["Series1"]["PointWidth"] = "0.5";// Show data points labels  

            cht_report.Series["Series1"].IsValueShownAsLabel = false;// Set data points label style  

            cht_report.Series["Series1"]["BarLabelStyle"] = "Center";// Show chart as 3D  

            cht_report.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = false;// Draw chart as 3D   

            cht_report.Series["Series1"]["DrawingStyle"] = "Cylinder";

        }

    }
}